# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
# Contributor: Felix Yan <felixonmars@archlinux>

pkgname=python-html2text
pkgver=2020.1.16
pkgrel=9
pkgdesc="A HTML to markdown-structured text converter"
arch=('any')
url="https://pypi.python.org/pypi/html2text/"
license=('GPL3')
depends=('python')
makedepends=('python-setuptools')
checkdepends=('python-pytest')
provides=('html2text')
replaces=('html2text')
source=($pkgname-$pkgver.tar.gz::https://github.com/Alir3z4/html2text/archive/$pkgver.tar.gz)
sha256sums=('209a2c4d7897e83a6999160ef51ae71bdb8c3eede99e103f12edb25199d4d11e')

build() {
  cd "${srcdir}"/html2text-$pkgver
  python setup.py build
}

check() {
  cd "${srcdir}"/html2text-$pkgver
  pytest
}

package() {
  cd "${srcdir}"/html2text-$pkgver

  python setup.py install --root="${pkgdir}"
}
